import { createRouter, createWebHistory } from "vue-router";
import type { App } from "vue";

const routes = [
  { path: "/", component: () => import("@/views/javaScript/z-radio.vue") },
  { path: "/javaScript/radio", component: () => import("@/views/javaScript/z-radio.vue") },
  { path: "/javaScript/checkbox", component: () => import("@/views/javaScript/z-checkbox.vue") },
  { path: "/javaScript/popup", component: () => import("@/views/javaScript/z-popup.vue") },
  { path: "/javaScript/switch", component: () => import("@/views/javaScript/z-switch.vue") },
  
];

const router = createRouter({
  // createWebHashHistory (hash路由 Hash模式 #)
  // createWebHistory (history路由 HTML5 模式 推荐，需要服务器配置支持)
  // createMemoryHistory 带缓存 history 路由
  // 添加baseUrl，createWebHistory(baseUrl)
  history: createWebHistory(),
  routes,
});

export default router;